<?php

class Util_JxUrls {

    public static function base_url() {
        $apf = APF::get_instance();
        $base_domain = $apf->get_config("base_domain");
        $url = 'http://' . $base_domain . '/';
        return $url;
    }
    //登陆日志
    public static function show_login_log_url(){
        return self::base_url().'plan/ShowLog/';
    }
    //设置考评月
    //设置考评日
    //主管权限
    //冻结考评
    //设置271
    //调整考评
    public static function setting_url($action,$params=array()){
        return self::base_url().'setting/'.$action.'/';
    }
    //绩效汇总
    public static function summary_url(){
        return self::base_url().'summary/search/';
    }

    public static function grade_url($action,$params=array()){
        $url =  self::base_url().'grade/'.$action.'/';
        if($params){
            $url .= '?'.http_build_query($params);
        }
        return $url;
    }

    public static function plan_url($action,$params=array()){
        $url =  self::base_url().'plan/'.$action.'/';
        if($params){
            $url .= '?'.http_build_query($params);
        }
        return $url;
    }

    public static function team_url($action,$params=array()){
        $url =  self::base_url().'team/'.$action.'/';
        if($params){
            $url .= '?'.http_build_query($params);
        }
        return $url;
    }
    //获取某次考评日期列表
    public static function ajax_get_days(){
        return self::base_url().'ajax/SetDays/';
    }
    public static function ajax_action_url($act){
        return self::base_url().'ajax/'.$act.'/';
    }
    /**
     * 提示页面跳转链接
     * @params array URL后面参数
     */
    public static function build_jump_url($params){
        return self::base_url().'error/ShowTips/'.$params;
    }
    public static function get_changeMember_url(){
    	return self::base_url().'ajax/ChangeMember/';
    }
    public static function get_changeSuper_url(){
    	return self::base_url().'ajax/ChangeSuperior/';
    }
    public static function get_structure_url(){
    	return self::base_url().'ajax/StructureTree/';
    }
    public static function set_virtual_leader(){
    	return self::base_url().'ajax/SetBrantchLeader/';
    }
    public static function get_tree_url(){
    	return self::base_url().'setting/showUserTreeAction/';
    }
    public static function get_back_url(){
    	return self::base_url().'setting/SetBrantchLeader/';
    }
}